CREATE TABLE [dbo].[tb_Integracion]
(
[idintegracion] [int] NOT NULL IDENTITY(1, 1),
[Alumno] [int] NOT NULL,
[ALectivo] [int] NOT NULL,
[Nivel] [int] NOT NULL,
[Turno] [int] NOT NULL,
[OrgOrigen] [int] NOT NULL,
[OrgIntegradora] [int] NOT NULL,
[Localidad] [int] NOT NULL,
[DocenteIntegradora] [int] NOT NULL,
[Discapacidad] [int] NOT NULL,
[Observaciones] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Desde] [datetime] NULL,
[Hasta] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_Integracion] ADD CONSTRAINT [PK_tb_integracion] PRIMARY KEY CLUSTERED  ([idintegracion]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_Integracion] WITH NOCHECK ADD CONSTRAINT [FK_tb_Integracion_tb_Alumnos] FOREIGN KEY ([Alumno]) REFERENCES [dbo].[tb_Alumnos] ([idAlumno])
GO
ALTER TABLE [dbo].[tb_Integracion] WITH NOCHECK ADD CONSTRAINT [FK_tb_Integracion_tb_Discapacidades] FOREIGN KEY ([Discapacidad]) REFERENCES [dbo].[tb_Discapacidades] ([iddiscapacidad])
GO
ALTER TABLE [dbo].[tb_Integracion] WITH NOCHECK ADD CONSTRAINT [FK_tb_Integracion_tb_Agentes] FOREIGN KEY ([DocenteIntegradora]) REFERENCES [dbo].[tb_Agentes] ([idAgente])
GO
ALTER TABLE [dbo].[tb_Integracion] WITH NOCHECK ADD CONSTRAINT [FK_tb_Integracion_tb_Localidades] FOREIGN KEY ([Localidad]) REFERENCES [dbo].[tb_Localidades] ([idLocalidad]) NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[tb_Integracion] WITH NOCHECK ADD CONSTRAINT [FK_tb_Integracion_tb_NivelesEnsenanza] FOREIGN KEY ([Nivel]) REFERENCES [dbo].[tb_NivelesEnsenanza] ([idNivelEnsenanza])
GO
ALTER TABLE [dbo].[tb_Integracion] WITH NOCHECK ADD CONSTRAINT [FK_tb_Integracion_tb_Organizaciones1] FOREIGN KEY ([OrgIntegradora]) REFERENCES [dbo].[tb_Organizaciones] ([idOrganizaciones])
GO
ALTER TABLE [dbo].[tb_Integracion] WITH NOCHECK ADD CONSTRAINT [FK_tb_Integracion_tb_Organizaciones] FOREIGN KEY ([OrgOrigen]) REFERENCES [dbo].[tb_Organizaciones] ([idOrganizaciones])
GO
ALTER TABLE [dbo].[tb_Integracion] WITH NOCHECK ADD CONSTRAINT [FK_tb_Integracion_tb_Turnos] FOREIGN KEY ([Turno]) REFERENCES [dbo].[tb_Turnos] ([idTurno])
GO
ALTER TABLE [dbo].[tb_Integracion] NOCHECK CONSTRAINT [FK_tb_Integracion_tb_Localidades]
GO
